﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;

namespace GameSchool.Models
{
	public class EditLevelViewModel : TeacherMasterViewModel
	{
		public List<Level> courseLevels { get; set; }
		public int assignmentXP { get; set; }
		public int examXP { get; set; }
		public int lectureXP { get; set; }
        public List<Level> Levels { get; set; }
        public Assignment Assignment { get; set; }
        public ArrayList misc { get; set; }
        public class LevelAndTasksItem
        {
            public int levelID { get; set; }
            public int examID { get; set; }
            public int assignmentID { get; set; }
            public int lectureID { get; set; }
            public string levelTitle { get; set; }
            public int levelNumber { get; set; }
            public int levelXP { get; set; }
        }
        public List<LevelAndTasksItem> itemList { get; set; }
	}

	public class EditCourseViewModel : TeacherMasterViewModel
    {
		public int numberOfLevels { get; set; }
        public int courseXP { get; set; }
    }

    public class AssignTeacherViewModel
    {
        public IEnumerable<Teacher> teacherName { get; set; }
        public IEnumerable<Course> courseName { get; set; }
    }

    public class AssignStudentViewModel
    {
        public IEnumerable<Student> studentName { get; set; }
        public IEnumerable<Course> courseName { get; set; }
    }

    public class StudentMasterViewModel
    {
        public string studentName { get; set; }
        public int numAchievements { get; set; }
        public int numNotifications { get; set; }
        public List<string> notificationText { get; set; }
        public List<string> courseNavbar { get; set; }
        public List<Course> sidebarCourses { get; set; }
        public int courseID { get; set; }
    }

        // eiki: this is the viewmodel that we need to render StudentHome.
        public class StudentHomeViewModel : StudentMasterViewModel
        {
            public int numAssignments { get; set; }
            public int numExams { get; set; }
            public int numLectures { get; set; }
            public class deadlinesListItem
            {
                public string courseName { get; set; }
                public string taskType { get; set; }
                public string level { get; set; }
                public int daysLeft { get; set; }
            }
            public List<deadlinesListItem> deadlines { get; set; }
            public List<string> deadlinesCourseName { get; set; }
            public List<Assignment> listAssignments { get; set; }
            public IEnumerable<Achievement> listAchievements { get; set; }
            public List<Course> listCourses { get; set; }
            public List<Student> studentXP { get; set; }
            public class courseProgressOverview // for the "overview of your courses" thing in StudentHome
            {
                public string courseName { get; set; }
                public int currentLevelInCourse { get; set; }
                public int totalLevelsInCourse { get; set; }
                public int currentXPInCourse { get; set; }
                public int xpBelowStudent { get; set; }
                public int xpAboveStudent { get; set; }
            }
            public List<courseProgressOverview> studentProgressDashboard { get; set; }
        }

        public class StudentAssignmentsListViewModel : StudentMasterViewModel
        {
            public class upcomingAssignmentItem
            {
                public string name { get; set; }
                public int levelNumber { get; set; }
                public int daysLeft { get; set; }
                public int earnedXP { get; set; }
                public double totalXP { get; set; }
            }
            public List<upcomingAssignmentItem> upcomingList { get; set; }
        }



    //Óli -- then Eiki
    public class StudentDashboardViewModel : StudentHomeViewModel
    { //formerly known as StudentAssignmentsOverview
        public string courseName { get; set; }
        public courseProgressOverview progressOverview { get; set; }
        public int courseID { get; set; }
        public int assignmentID { get; set; }
    }

        public class StudentPartialViewModel : StudentMasterViewModel
        {
            public int numAssignments { get; set; }
            public int numExams { get; set; }
            public int numLectures { get; set; }
            public List<Lecture> lectures { get; set; }
            public List<Assignment> assignments { get; set; }
            public List<Exam> exams { get; set; }
            public List<Level> levels { get; set; }
            public List<Achievement> achievements { get; set; }
            public List<Student> students { get; set; }
            public List<Course> courses { get; set; }
            public List<string> courseNames { get; set; }
            public List<Comment> comments { get; set; }
        }

        public class SupervisorPartialViewModel
        {
            public List<Student> students { get; set; }
            public List<Course> courses { get; set; }
            public List<Teacher> teachers { get; set; }
            public int numStudents { get; set; }
            public int numTeachers { get; set; }
            public string courseOverview { get; set; }
        }

        public class singleAssignmentViewModel : StudentMasterViewModel // eiki
        {
            public Assignment theAssignment { get; set; }
            public int assID { get; set; }
            public int courseID { get; set; }
            public int studentID { get; set; }
            public StudentAssignment stuAss { get; set; }
            public List<Assignment> AssignmentList { get; set; }

        }

		public class TeacherMasterViewModel
		{
			public string teacherName { get; set; }
			public int numNotifications { get; set; }
			public List<string> notificationText { get; set; }
			public List<Course> courseNavBar { get; set; }
			public List<Course> sidebarCourses { get; set; }
            public Course theCourse { get; set; }
            public string courseName { get; set; }
            public int courseID { get; set; }
		}

        public class TeacherPartialViewModel :TeacherMasterViewModel
        {
            public int numAchievements { get; set; }
            public List<Lecture> lectures { get; set; }
            public List<Assignment> assignments { get; set; }
            public List<Exam> exams { get; set; }
            public List<Level> levels { get; set; }
            public List<Achievement> achievements { get; set; }
            public List<Student> students { get; set; }
            public List<Course> courses { get; set; }
            public List<Comment> comments { get; set; }
        }

        //Eiki
        public class TeacherXPAssignViewModel : TeacherMasterViewModel
        {
            public int teacherID { get; set; }
            public int stuID { get; set; }
            public int assID { get; set; }
            public StudentAssignment stuAss { get; set; }
            public List<StudentAssignment> listStudentAssignments { get; set; }
            public double assXP { get; set; }
            public string studentName { get; set; }
        }

        //Óli
        public class TeacherCourseViewModel : TeacherMasterViewModel
        {
            public IEnumerable<Level> levels { get; set; }
            public List<Course> listCourses { get; set; }

        }


        public class AssignmentViewModel : TeacherMasterViewModel
        {
            public List<Assignment> assignments { get; set; }
            public Assignment createAss { get; set; }
            public List<Course> courses { get; set; }
            public List<Level> levels { get; set; }
            public Teacher loggedInTeacher { get; set; }
            public int levelID { get; set; }
            public int assignmentID { get; set; }
            public double assignmentXP { get; set; }
            public string assignmentTitle { get; set; }
            public string assignmentDescription { get; set; }
            public int assignmentTimeLimit { get; set; }
            public string assignmentFile { get; set; }
        }

        public class LectureViewModel : TeacherMasterViewModel
        {
            public Lecture lec { get; set; }
            public Level level { get; set; }
            public string studentName { get; set; }
            public int studentID { get; set; }
            public int teacherID { get; set; }
            public int levelID { get; set; }
            public double lectureXP { get; set; }
            public string urlLink { get; set; }
            public List <Level> levels {get; set;}
            public List<Comment> comments { get; set; }
            public Course course {get; set;}
            public Comment comment { get; set; }
            public Teacher loggedInTeacher { get; set; }
            public Student loggedInStudent { get; set; }
            public Lecture currentLecture { get; set; }
            public int lectureID { get; set; }
            public string lectureTitle { get; set; }
            public string lectureDescription { get; set; }
            public string lectureFile { get; set; }
            public bool lectureAllowApproval { get; set; }
            public int lectureApprovalXPAmount { get; set; }
            public int lectureLikeAmountToGainXP { get; set; }
            public int lectureLikeXPAmount { get; set; }
        }

        public class StudentLectureViewModel : StudentMasterViewModel
        {
            public Lecture lec { get; set; }
            public Level level { get; set; }
            public string studentName { get; set; }
            public string courseName { get; set; }
            public int studentID { get; set; }
            public int teacherID { get; set; }
            public int levelID { get; set; }
            public double lectureXP { get; set; }
            public string urlLink { get; set; }
            public IEnumerable<Level> levels { get; set; }
            public List<Comment> comments { get; set; }
            public Course course { get; set; }
            public Comment comment { get; set; }
            public Student loggedInStudent { get; set; }
            public Lecture currentLecture { get; set; }
            public int lectureID { get; set; }
            public string lectureTitle { get; set; }
            public string lectureDescription { get; set; }
            public string lectureFile { get; set; }
            public bool lectureAllowApproval { get; set; }
            public int lectureApprovalXPAmount { get; set; }
            public int lectureLikeAmountToGainXP { get; set; }
            public int lectureLikeXPAmount { get; set; }
            public class LevelAndTasksItem
            {
                public int levelID { get; set; }
                public int lectureID { get; set; }
                public string levelTitle { get; set; }
                public int levelNumber { get; set; }
                public int levelXP { get; set; }
            }
            public List<LevelAndTasksItem> itemList { get; set; }
        }

        public class StudentAssignmentViewModel : StudentMasterViewModel
        {
            public Level level { get; set; }
            public string studentName { get; set; }
            public string courseName { get; set; }
            public int studentID { get; set; }
            public int teacherID { get; set; }
            public int levelID { get; set; }
            public IEnumerable<Level> levels { get; set; }
            public Course course { get; set; }
            public Student loggedInStudent { get; set; }
            public class LevelAndTasksItem
            {
                public int levelID { get; set; }
                public int assignmentID { get; set; }
                public string levelTitle { get; set; }
                public int levelNumber { get; set; }
                public int levelXP { get; set; }
            }
            public List<LevelAndTasksItem> itemList { get; set; }
        }

        public class ExamsViewModel : TeacherMasterViewModel
        {
            public Exam exam { get; set; }
            public Teacher loggedInTeacher { get; set; }
            //public string inputExam { get; set; }
            public string courseName { get; set; }
            public string studentName { get; set; }
            public List<Course> Courses { get; set; }
            public int LevelID { get; set; }
            public int courseID { get; set; }
            public int examID { get; set; }
            public double examXP { get; set; }
            public string examTitle { get; set; }
            public string examDescription { get; set; }
            public int examTimeLimit { get; set; }

        }

        public class ExamsStudentViewModel : StudentMasterViewModel
        {
            public Exam exam { get; set; }
            public Teacher loggedInTeacher { get; set; }
            //public string inputExam { get; set; }
            public string courseName { get; set; }
            public string studentName { get; set; }
            public List<Course> Courses { get; set; }
            public int LevelID { get; set; }
            public int courseID { get; set; }
            public int examID { get; set; }
            public double examXP { get; set; }
            public string examTitle { get; set; }
            public string examDescription { get; set; }
            public int examTimeLimit { get; set; }

        }

        public class DescriptionViewModel : StudentMasterViewModel
        {
            public string courseDescription { get; set; }
            public string courseName { get; set; }
            public int courseID { get; set; }
            public List<Course> Courses { get; set; }
        }

        public class XPAchievementViewModel : StudentMasterViewModel
        {
            public int numAssignments { get; set; }
            public int numExams { get; set; }
            public int numLectures { get; set; }
            public List<Assignment> listAssignments { get; set; }
            public List<Achievement> listAchievements { get; set; }
            public List<Course> listCourses { get; set; }
            public List<Student> studentXP { get; set; }


        }
    }